package com.probiz.estore.system.service;

import java.util.List;

import com.probiz.estore.common.model.system.PaymentMethod;
import com.probiz.estore.core.service.GenericManager;


/**
 * PaymentMethod Business Delegate (Proxy) Interface to handle communication between web and
 * persistence layer.
 * Developer introduced interfaces should be declared here. Won't get overwritten.
 *
 */
public interface PaymentMethodManager extends GenericManager<PaymentMethod>{
	
	/**
	 * 添加一个支付方式
	 * @param paymentGatewayId
	 * @param paymentGatewayName
	 * @return 
	 */
	public PaymentMethod addPaymentMethod(Integer paymentGatewayId);
	/**
	 * 删除一个支付方式
	 * @param paymentMethod
	 */
	public void removePaymentMethod(PaymentMethod paymentMethod);
	/**
	 * 后台获得所有可用的支付方式
	 * @return
	 */
	public List<PaymentMethod> findUnDeletedPaymentMethods();
	/**
	 * 批量更新支付方式
	 * @param paymentMethodList
	 */
	public void updateBatchPaymentMethods(List<PaymentMethod> paymentMethodList) ;
	/**
	 * 根据支付类型和状态获得支付方式列表
	 * @param paymentMethodType
	 * @param status
	 * @return
	 */
	public List<PaymentMethod> getByPaymentMethodTypeStatus(Short paymentMethodType,Short status);
	/**
	 * 根据支付类型获得支付方式列表
	 * @param paymentMethodType
	 * @return
	 */
	public List<PaymentMethod> getByPaymentMethodType(Short paymentMethodType);
	/**
	 * 根据支付网关获得支付方式
	 * @param paymentGatewayId
	 * @return
	 */
	public PaymentMethod getByPaymentGatewayId(Integer paymentGatewayId);
	/**
	 * 根据支付网关名称获得支付方式
	 * @param paymentGatewayName
	 * @return
	 */
	public PaymentMethod getByPaymentGatewayName(String paymentGatewayName);
	
	/**
	 * 根据网关类型和支付状态获得在线支付方式列表
	 * @param paymentGatewayType 网关类型 0:pc支付，1:mobile支付
	 * @param status
	 * @return
	 */
	public List<PaymentMethod> getOnlinePaymentMethodByPaymentGatewayTypeStatus(Short paymentGatewayType, Short status);
}
